package com.zen.android.sample.main;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;


import com.zen.android.sample.R;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zeng
 * @Create at 2017/12/20
 * @Description: .
 */
public class SampleActivity extends AppCompatActivity {

    private RecyclerView mRecyclerView;
    private List<SampleBean> mDemoList = new ArrayList<>();

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sample);
        buildList();
        mRecyclerView = (RecyclerView) findViewById(R.id.sample_recyclerView);
        LinearLayoutManager manager = new LinearLayoutManager(this);
        manager.setOrientation(LinearLayoutManager.VERTICAL);
        mRecyclerView.setLayoutManager(manager);
        MainSampleAdapter adapter = new MainSampleAdapter(this, mDemoList);
        mRecyclerView.setAdapter(adapter);
    }


    private void buildList() {
        mDemoList.add(new SampleBean("扫描内存动画", com.zen.android.sample.scananim.ScanAnimActivity.class));
    }


}
